<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 800px;
            height: 200px;
            background: blue;
        }

        /* 水平是有效 */
        span {
            margin-left: 100px;
            padding-left: 100px;
        }

        /* 垂直失效 */
        span {
            margin-top: 100px;
            padding-bottom: 100px;
        }
    </style>
</head>
<!-- 行内元素设置marign和padding 水平方向有效-垂直方式排版失效 -->


<body>
    <div></div>
    <span>1</span> <span>2</span> <span>3</span>
    <div></div>
</body>

</html>